package com.tarena.all;

import java.applet.*;
import java.awt.*;
import java.awt.geom.*;
 

public class GradientTest extends Applet{
	public void paint(Graphics g){
			Graphics2D g2d=(Graphics2D)g;
			Rectangle2D r=new Rectangle2D.Double(25,20,150,50);
			GradientPaint p=new GradientPaint(25,20,Color.yellow,30,25,Color.green,true);
			g2d.setPaint(p);
			g2d.fill(r);
			g2d.setPaint(Color.blue);
			g2d.setStroke(new BasicStroke(5,BasicStroke.CAP_BUTT,BasicStroke.JOIN_ROUND));
			g2d.draw(r);
			
			
		}	
	

}
